fix: mount spark-env.sh and security.properties - #761
Open
sweb wants to merge 2 commits into
Open
Conversation
sweb
force-pushed
the
fix/mount-files
branch
from
September 1, 2026 10:56
0aed9e2 to
9c94061
Compare
sweb
marked this pull request as ready for review
September 1, 2026 14:53
sweb
force-pushed
the
fix/mount-files
branch
from
September 2, 2026 15:13
0ff62bd to
a8c0d4d
Compare
Maleware
self-requested a review
September 3, 2026 09:29
Maleware
reviewed
Sep 3, 2026
| .collect::<Vec<String>>() | ||
| .join("\n") | ||
| .map(|(k, v)| { | ||
| ensure!(is_shell_identifier(k), InvalidSparkEnvShKeySnafu { key: k }); |
Member
There was a problem hiding this comment.
There are variables such as UID, EUID, PPID, SHELLOPTS and BASH_VERSINFO which are read only. Those technically are valid in this check and pass it.
However they later get silently rejected with
/stackable/spark/conf/spark-env.sh: line 3: UID: readonly variable
They end up in the driver's pod as log statements so technically it's covered. Very Nit: Catch the obvious here as a warning.
Maleware
requested changes
Sep 3, 2026
Maleware
left a comment
Member
There was a problem hiding this comment.
Works as expected, all integration tests pass.
Good work thank you. Just one minor change request and a nit commet.
| env = env.with_value( | ||
| &STACKABLE_PRE_HOOK, | ||
| format!( | ||
| "{pre_hook} . {VOLUME_MOUNT_PATH_CONFIG}/{SPARK_ENV_SH_FILE_NAME}; export SPARK_ENV_LOADED=1" |
Member
There was a problem hiding this comment.
This only works because this line ends with &.
I'd expect to either test for consistency or have a function extending it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
spark-env.shandsecurity.propertieswere not mounted for SparkApplication. In addition, this PR adds validation of keys inspark-env.sh. Checking values would be even better, but that is quite involved and was not added here.Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker